package com.xiaozhen.tcp.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/9/28 15:47
 * @description:
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "driver.tcp")
@RefreshScope
public class TcpConfig {

    /**
     * 端口号
     */
    private Integer port;

    /**
     * 是否开启心跳监测
     */
    private Boolean heartbeat = false;

    /**
     * 读超时  单位（秒）
     */
    private long readerIdleTime = 180;
    /**
     * 写超时 单位（秒）
     */
    private long writerIdleTime = 180;
    /**
     * 读写超时 单位（秒）
     */
    private long allIdleTime = 180;
}
